// source --> https://www.paxos-thalassatravel.com/wp-content/plugins/opal-estate-pro/assets/js/frontend/googlemaps.js?ver=1.6.9 ;( function ( $, settings ) { 'use strict'; if ( window.Opalestate === undefined ) { window.Opalestate = {}; } /** * GooglemapSearch */ var GooglemapSingle = Opalestate.GooglemapSingle = function ( data, id ) { /** * Create Google Map In Single Property Only */ var initializePropertyMap = function ( data, id ) { var propertyMarkerInfo = data; var enable = true; var url = propertyMarkerInfo.icon; var size = new google.maps.Size( 42, 57 ); var allMarkers = []; var setMapOnAll = function ( markers, map ) { for ( var i = 0; i < markers.length; i++ ) { markers[ i ].setMap( map ); } }; // retina if ( window.devicePixelRatio > 1.5 ) { if ( propertyMarkerInfo.retinaIcon ) { url = propertyMarkerInfo.retinaIcon; size = new google.maps.Size( 83, 113 ); } } var propertyLocation = new google.maps.LatLng( propertyMarkerInfo.latitude, propertyMarkerInfo.longitude ); var propertyMapOptions = { center: propertyLocation, zoom: 15, mapTypeId: google.maps.MapTypeId.ROADMAP, scrollwheel: false }; if ( ( typeof opalestateGmap !== 'undefined' ) ) { switch ( opalestateGmap.style ) { case 'standard': propertyMapOptions.styles = GoogleMapStyles.standard; break; case 'silver': propertyMapOptions.styles = GoogleMapStyles.silver; break; case 'retro': propertyMapOptions.styles = GoogleMapStyles.retro; break; case 'dark': propertyMapOptions.styles = GoogleMapStyles.dark; break; case 'night': propertyMapOptions.styles = GoogleMapStyles.night; break; case 'aubergine': propertyMapOptions.styles = GoogleMapStyles.aubergine; break; case 'custom': if ( opalestateGmap.custom_style != '' ) { propertyMapOptions.styles = $.parseJSON( opalestateGmap.custom_style ); } break; } } var propertyMap = new google.maps.Map( document.getElementById( id ), propertyMapOptions ); var createMarker = function ( position, icon ) { var image = { url: icon, size: size, scaledSize: new google.maps.Size( 32, 57 ), origin: new google.maps.Point( 0, 0 ), anchor: new google.maps.Point( 21, 56 ) }; var _marker = new google.maps.Marker( { map: propertyMap, position: position, icon: image } ); return _marker; }; var infowindow = new google.maps.InfoWindow(); createMarker( propertyLocation, url ); /** * Places near with actived types */ if ( enable ) { var $navs = $( '#' + id ).parent().find( '.property-search-places' ); $( ' .btn-map-search', $navs ).unbind( 'click' ).bind( 'click', function () { var service = new google.maps.places.PlacesService( propertyMap ); var type = $( this ).data( 'type' ); var $this = $( this ).parent(); var icon = { url: opalesateJS.mapiconurl + $( this ).data( 'icon' ), scaledSize: new google.maps.Size( 28, 28 ), anchor: new google.maps.Point( 21, 16 ), origin: new google.maps.Point( 0, 0 ) }; if ( !allMarkers[ type ] || allMarkers[ type ].length <= 0 ) { var markers = []; var bounds = propertyMap.getBounds(); var $this = $( this ); service.nearbySearch( { location: propertyLocation, radius: 2000, bounds: bounds, type: type }, callbackNearBy ); function callbackNearBy( results, status ) { if ( status === google.maps.places.PlacesServiceStatus.OK ) { for ( var i = 0; i < results.length; i++ ) { createMarkerNearBy( results[ i ] ); } $( '.nearby-counter', $this ).remove(); $( 'span', $this ) .append( $( '' + markers.length + '' ) ); allMarkers[ type ] = markers; } } function abc() { if ( status === google.maps.places.PlacesServiceStatus.OK ) { for ( var i = 0; i < results.length; i++ ) { var place = results[ i ]; var marker = new google.maps.Marker( { map: propertyMap, position: place.geometry.location, icon: icon, visible: true } ); marker.setMap( propertyMap ); google.maps.event.addListener( marker, 'click', function () { infowindow.setContent( place.name ); infowindow.open( propertyMap, this ); } ); markers.push( marker ); } $( '.nearby-counter', $this ).remove(); $( 'span', $this ) .append( $( '' + markers.length + '' ) ); allMarkers[ type ] = markers; } } function createMarkerNearBy( place ) { var placeLoc = place.geometry.location; var marker = new google.maps.Marker( { map: propertyMap, position: place.geometry.location, icon: icon, visible: true } ); marker.setMap( propertyMap ); google.maps.event.addListener( marker, 'click', function () { infowindow.setContent( place.name ); infowindow.open( propertyMap, this ); } ); markers.push( marker ); } } else { for ( var i = 0; i < allMarkers[ type ].length; i++ ) { allMarkers[ type ][ i ].setMap( null ); } allMarkers[ type ] = []; } $( this ).toggleClass( 'active' ); } ); } }; initializePropertyMap( data, id ); }; var GoogleMapSearch = Opalestate.GooglemapSingle = function ( data ) { var initializePropertiesMap = function ( properties ) { // Properties Array var mapOptions = { zoom: 12, maxZoom: 16, scrollwheel: false, mapTypeId: google.maps.MapTypeId.ROADMAP, panControl: false, zoomControl: true, mapTypeControl: false, scaleControl: false, streetViewControl: true, overviewMapControl: false, zoomControlOptions: { style: google.maps.ZoomControlStyle.SMALL, position: google.maps.ControlPosition.RIGHT_TOP }, streetViewControlOptions: { position: google.maps.ControlPosition.RIGHT_TOP } }; if ( ( typeof opalestateGmap !== 'undefined' ) ) { switch ( opalestateGmap.style ) { case 'standard': mapOptions.styles = GoogleMapStyles.standard; break; case 'silver': mapOptions.styles = GoogleMapStyles.silver; break; case 'retro': mapOptions.styles = GoogleMapStyles.retro; break; case 'dark': mapOptions.styles = GoogleMapStyles.dark; break; case 'night': mapOptions.styles = GoogleMapStyles.night; break; case 'aubergine': mapOptions.styles = GoogleMapStyles.aubergine; break; case 'custom': if ( opalestateGmap.custom_style != '' ) { mapOptions.styles = $.parseJSON( opalestateGmap.custom_style ); } break; } } var map = new google.maps.Map( document.getElementById( 'opalestate-map-preview' ), mapOptions ); var bounds = new google.maps.LatLngBounds(); // Loop to generate marker and infowindow based on properties array var markers = new Array(); for ( var i = 0; i < properties.length; i++ ) { var url = properties[ i ].icon; var size = new google.maps.Size( 42, 57 ); if ( window.devicePixelRatio > 1.5 ) { if ( properties[ i ].retinaIcon ) { url = properties[ i ].retinaIcon; size = new google.maps.Size( 83, 113 ); } } var image = { url: url, size: size, scaledSize: new google.maps.Size( 30, 51 ), origin: new google.maps.Point( 0, 0 ), anchor: new google.maps.Point( 21, 56 ) }; markers[ i ] = new google.maps.Marker( { position: new google.maps.LatLng( properties[ i ].lat, properties[ i ].lng ), map: map, icon: image, title: properties[ i ].title, animation: google.maps.Animation.DROP, visible: true } ); bounds.extend( markers[ i ].getPosition() ); var boxText = document.createElement( 'div' ); var pricelabel = ''; if ( properties[ i ].pricelabel ) { pricelabel = ' / ' + properties[ i ].pricelabel; } boxText.className = 'map-info-preview media'; function opalestate_get_property_icon( $key ) { var $icon = $key; switch ( $key ) { case 'builtyear': $icon = 'fas fa-calendar'; break; case 'parking': $icon = 'fas fa-car'; break; case 'bedrooms': $icon = 'fas fa-bed'; break; case 'bathrooms': $icon = 'fas fa-bath'; break; case 'plotsize': $icon = 'fas fa-map'; break; case 'areasize': $icon = 'fas fa-arrows-alt'; break; case 'orientation': $icon = 'fas fa-compass'; break; case 'livingrooms': $icon = 'fas fa-tv'; break; case 'kitchens': $icon = 'fas fa-utensils'; break; case 'amountrooms': $icon = 'fas fa-building'; break; default: $icon = $key; break; } return $icon; } var meta = ''; boxText.innerHTML = '
' + '' + properties[ i ].title +
                    '' + '' + properties[ i ].status + '
' + '
' + '
' + properties[ i ].title + '

' + properties[ i ].address + '

' + properties[ i ].pricehtml + pricelabel + '

' + meta + '
' + '
'; var myOptions = { content: boxText, disableAutoPan: true, maxWidth: 0, alignBottom: true, pixelOffset: new google.maps.Size( -122, -48 ), zIndex: null, closeBoxMargin: '0 0 -16px -16px', closeBoxURL: opalesateJS.mapiconurl + 'close.png', infoBoxClearance: new google.maps.Size( 1, 1 ), isHidden: false, pane: 'floatPane', enableEventPropagation: false }; var ib = new InfoBox( myOptions ); attachInfoBoxToMarker( map, markers[ i ], ib, i ); } var last = null; $( 'body' ).delegate( '[data-related="map"]', 'mouseenter', function () { if ( $( this ).hasClass( 'map-active' ) ) { return true; } var i = $( this ).data( 'id' ); $( '[data-related="map"]' ).removeClass( 'map-active' ); $( this ).addClass( 'active' ); map.setZoom( 65536 );// alert( scale ); if ( markers[ i ] ) { var marker = markers[ i ]; google.maps.event.trigger( markers[ i ], 'click' ); var scale = Math.pow( 2, map.getZoom() ); var offsety = ( ( 100 / scale ) || 0 ); var projection = map.getProjection(); var markerPosition = marker.getPosition(); var markerScreenPosition = projection.fromLatLngToPoint( markerPosition ); var pointHalfScreenAbove = new google.maps.Point( markerScreenPosition.x, markerScreenPosition.y - offsety ); var aboveMarkerLatLng = projection.fromPointToLatLng( pointHalfScreenAbove ); map.setZoom( scale ); map.setCenter( aboveMarkerLatLng ); } return false; } ); map.fitBounds( bounds ); /* Marker Clusters */ var markerClustererOptions = { ignoreHidden: true, maxZoom: 14, styles: [ { textColor: '#000000', url: opalesateJS.mapiconurl + 'cluster-icon.png', height: 51, width: 30 } ] }; var markerClusterer = new MarkerClusterer( map, markers, markerClustererOptions ); function attachInfoBoxToMarker( map, marker, infoBox, i ) { google.maps.event.addListener( marker, 'click', function () { if ( $( '[data-related="map"]' ).filter( '[data-id="' + i + '"]' ).length > 0 ) { var $m = $( '[data-related="map"]' ).filter( '[data-id="' + i + '"]' ); $( '[data-related="map"]' ).removeClass( 'map-active' ); $m.addClass( 'map-active' ); } if ( last != null ) { last.close(); } var scale = Math.pow( 2, map.getZoom() ); var offsety = ( ( 100 / scale ) || 0 ); var projection = map.getProjection(); var markerPosition = marker.getPosition(); var markerScreenPosition = projection.fromLatLngToPoint( markerPosition ); var pointHalfScreenAbove = new google.maps.Point( markerScreenPosition.x, markerScreenPosition.y - offsety ); var aboveMarkerLatLng = projection.fromPointToLatLng( pointHalfScreenAbove ); map.setCenter( aboveMarkerLatLng ); infoBox.open( map, marker ); last = infoBox; } ); } }; initializePropertiesMap( data ); }; var GoogleMapStyles = { standard: [], silver: [ { 'elementType': 'geometry', 'stylers': [ { 'color': '#f5f5f5' } ] }, { 'elementType': 'labels.icon', 'stylers': [ { 'visibility': 'off' } ] }, { 'elementType': 'labels.text.fill', 'stylers': [ { 'color': '#616161' } ] }, { 'elementType': 'labels.text.stroke', 'stylers': [ { 'color': '#f5f5f5' } ] }, { 'featureType': 'administrative.land_parcel', 'elementType': 'labels.text.fill', 'stylers': [ { 'color': '#bdbdbd' } ] }, { 'featureType': 'poi', 'elementType': 'geometry', 'stylers': [ { 'color': '#eeeeee' } ] }, { 'featureType': 'poi', 'elementType': 'labels.text.fill', 'stylers': [ { 'color': '#757575' } ] }, { 'featureType': 'poi.park', 'elementType': 'geometry', 'stylers': [ { 'color': '#e5e5e5' } ] }, { 'featureType': 'poi.park', 'elementType': 'labels.text.fill', 'stylers': [ { 'color': '#9e9e9e' } ] }, { 'featureType': 'road', 'elementType': 'geometry', 'stylers': [ { 'color': '#ffffff' } ] }, { 'featureType': 'road.arterial', 'elementType': 'labels.text.fill', 'stylers': [ { 'color': '#757575' } ] }, { 'featureType': 'road.highway', 'elementType': 'geometry', 'stylers': [ { 'color': '#dadada' } ] }, { 'featureType': 'road.highway', 'elementType': 'labels.text.fill', 'stylers': [ { 'color': '#616161' } ] }, { 'featureType': 'road.local', 'elementType': 'labels.text.fill', 'stylers': [ { 'color': '#9e9e9e' } ] }, { 'featureType': 'transit.line', 'elementType': 'geometry', 'stylers': [ { 'color': '#e5e5e5' } ] }, { 'featureType': 'transit.station', 'elementType': 'geometry', 'stylers': [ { 'color': '#eeeeee' } ] }, { 'featureType': 'water', 'elementType': 'geometry', 'stylers': [ { 'color': '#c9c9c9' } ] }, { 'featureType': 'water', 'elementType': 'labels.text.fill', 'stylers': [ { 'color': '#9e9e9e' } ] } ], retro: [ { 'elementType': 'geometry', 'stylers': [ { 'color': '#ebe3cd' } ] }, { 'elementType': 'labels.text.fill', 'stylers': [ { 'color': '#523735' } ] }, { 'elementType': 'labels.text.stroke', 'stylers': [ { 'color': '#f5f1e6' } ] }, { 'featureType': 'administrative', 'elementType': 'geometry.stroke', 'stylers': [ { 'color': '#c9b2a6' } ] }, { 'featureType': 'administrative.land_parcel', 'elementType': 'geometry.stroke', 'stylers': [ { 'color': '#dcd2be' } ] }, { 'featureType': 'administrative.land_parcel', 'elementType': 'labels.text.fill', 'stylers': [ { 'color': '#ae9e90' } ] }, { 'featureType': 'landscape.natural', 'elementType': 'geometry', 'stylers': [ { 'color': '#dfd2ae' } ] }, { 'featureType': 'poi', 'elementType': 'geometry', 'stylers': [ { 'color': '#dfd2ae' } ] }, { 'featureType': 'poi', 'elementType': 'labels.text.fill', 'stylers': [ { 'color': '#93817c' } ] }, { 'featureType': 'poi.park', 'elementType': 'geometry.fill', 'stylers': [ { 'color': '#a5b076' } ] }, { 'featureType': 'poi.park', 'elementType': 'labels.text.fill', 'stylers': [ { 'color': '#447530' } ] }, { 'featureType': 'road', 'elementType': 'geometry', 'stylers': [ { 'color': '#f5f1e6' } ] }, { 'featureType': 'road.arterial', 'elementType': 'geometry', 'stylers': [ { 'color': '#fdfcf8' } ] }, { 'featureType': 'road.highway', 'elementType': 'geometry', 'stylers': [ { 'color': '#f8c967' } ] }, { 'featureType': 'road.highway', 'elementType': 'geometry.stroke', 'stylers': [ { 'color': '#e9bc62' } ] }, { 'featureType': 'road.highway.controlled_access', 'elementType': 'geometry', 'stylers': [ { 'color': '#e98d58' } ] }, { 'featureType': 'road.highway.controlled_access', 'elementType': 'geometry.stroke', 'stylers': [ { 'color': '#db8555' } ] }, { 'featureType': 'road.local', 'elementType': 'labels.text.fill', 'stylers': [ { 'color': '#806b63' } ] }, { 'featureType': 'transit.line', 'elementType': 'geometry', 'stylers': [ { 'color': '#dfd2ae' } ] }, { 'featureType': 'transit.line', 'elementType': 'labels.text.fill', 'stylers': [ { 'color': '#8f7d77' } ] }, { 'featureType': 'transit.line', 'elementType': 'labels.text.stroke', 'stylers': [ { 'color': '#ebe3cd' } ] }, { 'featureType': 'transit.station', 'elementType': 'geometry', 'stylers': [ { 'color': '#dfd2ae' } ] }, { 'featureType': 'water', 'elementType': 'geometry.fill', 'stylers': [ { 'color': '#b9d3c2' } ] }, { 'featureType': 'water', 'elementType': 'labels.text.fill', 'stylers': [ { 'color': '#92998d' } ] } ], dark: [ { 'elementType': 'geometry', 'stylers': [ { 'color': '#212121' } ] }, { 'elementType': 'labels.icon', 'stylers': [ { 'visibility': 'off' } ] }, { 'elementType': 'labels.text.fill', 'stylers': [ { 'color': '#757575' } ] }, { 'elementType': 'labels.text.stroke', 'stylers': [ { 'color': '#212121' } ] }, { 'featureType': 'administrative', 'elementType': 'geometry', 'stylers': [ { 'color': '#757575' } ] }, { 'featureType': 'administrative.country', 'elementType': 'labels.text.fill', 'stylers': [ { 'color': '#9e9e9e' } ] }, { 'featureType': 'administrative.land_parcel', 'stylers': [ { 'visibility': 'off' } ] }, { 'featureType': 'administrative.locality', 'elementType': 'labels.text.fill', 'stylers': [ { 'color': '#bdbdbd' } ] }, { 'featureType': 'poi', 'elementType': 'labels.text.fill', 'stylers': [ { 'color': '#757575' } ] }, { 'featureType': 'poi.park', 'elementType': 'geometry', 'stylers': [ { 'color': '#181818' } ] }, { 'featureType': 'poi.park', 'elementType': 'labels.text.fill', 'stylers': [ { 'color': '#616161' } ] }, { 'featureType': 'poi.park', 'elementType': 'labels.text.stroke', 'stylers': [ { 'color': '#1b1b1b' } ] }, { 'featureType': 'road', 'elementType': 'geometry.fill', 'stylers': [ { 'color': '#2c2c2c' } ] }, { 'featureType': 'road', 'elementType': 'labels.text.fill', 'stylers': [ { 'color': '#8a8a8a' } ] }, { 'featureType': 'road.arterial', 'elementType': 'geometry', 'stylers': [ { 'color': '#373737' } ] }, { 'featureType': 'road.highway', 'elementType': 'geometry', 'stylers': [ { 'color': '#3c3c3c' } ] }, { 'featureType': 'road.highway.controlled_access', 'elementType': 'geometry', 'stylers': [ { 'color': '#4e4e4e' } ] }, { 'featureType': 'road.local', 'elementType': 'labels.text.fill', 'stylers': [ { 'color': '#616161' } ] }, { 'featureType': 'transit', 'elementType': 'labels.text.fill', 'stylers': [ { 'color': '#757575' } ] }, { 'featureType': 'water', 'elementType': 'geometry', 'stylers': [ { 'color': '#000000' } ] }, { 'featureType': 'water', 'elementType': 'labels.text.fill', 'stylers': [ { 'color': '#3d3d3d' } ] } ], night: [ { 'elementType': 'geometry', 'stylers': [ { 'color': '#242f3e' } ] }, { 'elementType': 'labels.text.fill', 'stylers': [ { 'color': '#746855' } ] }, { 'elementType': 'labels.text.stroke', 'stylers': [ { 'color': '#242f3e' } ] }, { 'featureType': 'administrative.locality', 'elementType': 'labels.text.fill', 'stylers': [ { 'color': '#d59563' } ] }, { 'featureType': 'poi', 'elementType': 'labels.text.fill', 'stylers': [ { 'color': '#d59563' } ] }, { 'featureType': 'poi.park', 'elementType': 'geometry', 'stylers': [ { 'color': '#263c3f' } ] }, { 'featureType': 'poi.park', 'elementType': 'labels.text.fill', 'stylers': [ { 'color': '#6b9a76' } ] }, { 'featureType': 'road', 'elementType': 'geometry', 'stylers': [ { 'color': '#38414e' } ] }, { 'featureType': 'road', 'elementType': 'geometry.stroke', 'stylers': [ { 'color': '#212a37' } ] }, { 'featureType': 'road', 'elementType': 'labels.text.fill', 'stylers': [ { 'color': '#9ca5b3' } ] }, { 'featureType': 'road.highway', 'elementType': 'geometry', 'stylers': [ { 'color': '#746855' } ] }, { 'featureType': 'road.highway', 'elementType': 'geometry.stroke', 'stylers': [ { 'color': '#1f2835' } ] }, { 'featureType': 'road.highway', 'elementType': 'labels.text.fill', 'stylers': [ { 'color': '#f3d19c' } ] }, { 'featureType': 'transit', 'elementType': 'geometry', 'stylers': [ { 'color': '#2f3948' } ] }, { 'featureType': 'transit.station', 'elementType': 'labels.text.fill', 'stylers': [ { 'color': '#d59563' } ] }, { 'featureType': 'water', 'elementType': 'geometry', 'stylers': [ { 'color': '#17263c' } ] }, { 'featureType': 'water', 'elementType': 'labels.text.fill', 'stylers': [ { 'color': '#515c6d' } ] }, { 'featureType': 'water', 'elementType': 'labels.text.stroke', 'stylers': [ { 'color': '#17263c' } ] } ], aubergine: [ { 'elementType': 'geometry', 'stylers': [ { 'color': '#1d2c4d' } ] }, { 'elementType': 'labels.text.fill', 'stylers': [ { 'color': '#8ec3b9' } ] }, { 'elementType': 'labels.text.stroke', 'stylers': [ { 'color': '#1a3646' } ] }, { 'featureType': 'administrative.country', 'elementType': 'geometry.stroke', 'stylers': [ { 'color': '#4b6878' } ] }, { 'featureType': 'administrative.land_parcel', 'elementType': 'labels.text.fill', 'stylers': [ { 'color': '#64779e' } ] }, { 'featureType': 'administrative.province', 'elementType': 'geometry.stroke', 'stylers': [ { 'color': '#4b6878' } ] }, { 'featureType': 'landscape.man_made', 'elementType': 'geometry.stroke', 'stylers': [ { 'color': '#334e87' } ] }, { 'featureType': 'landscape.natural', 'elementType': 'geometry', 'stylers': [ { 'color': '#023e58' } ] }, { 'featureType': 'poi', 'elementType': 'geometry', 'stylers': [ { 'color': '#283d6a' } ] }, { 'featureType': 'poi', 'elementType': 'labels.text.fill', 'stylers': [ { 'color': '#6f9ba5' } ] }, { 'featureType': 'poi', 'elementType': 'labels.text.stroke', 'stylers': [ { 'color': '#1d2c4d' } ] }, { 'featureType': 'poi.park', 'elementType': 'geometry.fill', 'stylers': [ { 'color': '#023e58' } ] }, { 'featureType': 'poi.park', 'elementType': 'labels.text.fill', 'stylers': [ { 'color': '#3C7680' } ] }, { 'featureType': 'road', 'elementType': 'geometry', 'stylers': [ { 'color': '#304a7d' } ] }, { 'featureType': 'road', 'elementType': 'labels.text.fill', 'stylers': [ { 'color': '#98a5be' } ] }, { 'featureType': 'road', 'elementType': 'labels.text.stroke', 'stylers': [ { 'color': '#1d2c4d' } ] }, { 'featureType': 'road.highway', 'elementType': 'geometry', 'stylers': [ { 'color': '#2c6675' } ] }, { 'featureType': 'road.highway', 'elementType': 'geometry.stroke', 'stylers': [ { 'color': '#255763' } ] }, { 'featureType': 'road.highway', 'elementType': 'labels.text.fill', 'stylers': [ { 'color': '#b0d5ce' } ] }, { 'featureType': 'road.highway', 'elementType': 'labels.text.stroke', 'stylers': [ { 'color': '#023e58' } ] }, { 'featureType': 'transit', 'elementType': 'labels.text.fill', 'stylers': [ { 'color': '#98a5be' } ] }, { 'featureType': 'transit', 'elementType': 'labels.text.stroke', 'stylers': [ { 'color': '#1d2c4d' } ] }, { 'featureType': 'transit.line', 'elementType': 'geometry.fill', 'stylers': [ { 'color': '#283d6a' } ] }, { 'featureType': 'transit.station', 'elementType': 'geometry', 'stylers': [ { 'color': '#3a4762' } ] }, { 'featureType': 'water', 'elementType': 'geometry', 'stylers': [ { 'color': '#0e1626' } ] }, { 'featureType': 'water', 'elementType': 'labels.text.fill', 'stylers': [ { 'color': '#4e6d70' } ] } ] }; ///// $( document ).ready( function () { function initialize_property_street_view( data, id ) { var propertyMarkerInfo = data; var propertyLocation = new google.maps.LatLng( propertyMarkerInfo.latitude, propertyMarkerInfo.longitude ); /** * Street View */ var panoramaOptions = { position: propertyLocation, pov: { heading: 34, pitch: 10 } }; var panorama = new google.maps.StreetViewPanorama( document.getElementById( id ), panoramaOptions ); google.maps.event.trigger( panorama, 'resize' ); } $( '.property-preview-map' ).each( function () { new GooglemapSingle( $( this ).data(), $( this ).attr( 'id' ) ); } ); $( '.tab-google-street-view-btn' ).click( function () { $( '.property-preview-street-map' ).hide(); $( '.property-preview-street-map' ).each( function () { var d = $( this ).data(); var i = $( this ).attr( 'id' ); initialize_property_street_view( d, i ); } ); $( '.property-preview-street-map' ).show( 100 ); } ); /// // auto set height for split google map $( '.split-maps-container' ).each( function () { $( '#opalestate-map-preview ' ).height( $( window ).height() ); } ); } ); $( document ).ready( function () { // search // show google maps // update google maps var updatePreviewGoogleMap = function ( url ) { if ( $( '#opalestate-map-preview' ).length > 0 ) { $.ajax( { type: 'GET', dataType: 'json', url: opalesateJS.ajaxurl, data: url, success: function ( data ) { new GoogleMapSearch( data ); } } ); } }; if ( $( '#opalestate-map-preview' ).length > 0 || $( '.opalesate-properties-results' ).length > 0 ) { var currentLocation = location.search.substr( 1 ) + '&action=opalestate_ajx_get_properties&paged=' + $( '#opalestate-map-preview' ).data( 'page' ); updatePreviewGoogleMap( currentLocation ); } // update results function updatePropertiesResults( data ) { $( '.opalesate-properties-results' ).append( $( '
' ) ); $.ajax( { type: 'GET', url: opalesateJS.ajaxurl, data: data + '&action=opalestate_render_get_properties', success: function ( response ) { if ( response ) { $( '.opalesate-properties-results' ).html( response ); } $( '.opalesate-properties-results .opalestate-loading' ).remove(); $( '.opalestate-sortable select' ).select2( { width: '100%', minimumResultsForSearch: -1 } ); } } ); } function updatePropertiesByParseringHtml( newurl ) { $( '.opalesate-properties-results .opalesate-archive-bottom' ) .append( $( '
' ) ); $.ajax( { type: 'GET', url: newurl, dataType: 'html', cache: false, success: function ( data ) { if ( data ) { $( '.opalesate-properties-results' ) .html( $( data ).find( '.opalesate-properties-results' ).html() ); $( '.opalestate-sortable select' ).select2( { width: '100%', minimumResultsForSearch: -1 } ); } // $( '.opalesate-properties-results .opalestate-loading').remove(); } } ); } $( 'form.opalestate-search-form' ).submit( function () { if ( $( '#opalestate-map-preview' ).length > 0 ) { if ( $( '.opalesate-properties-results' ) && $( '.opalesate-properties-results' ).data( 'mode' ) == 'html' ) { var $form = $( this ); if ( history.pushState ) { var ps = $form.serialize(); var newurl = window.location.protocol + '//' + window.location.host + window.location.pathname + '?' + ps; window.history.pushState( { path: newurl }, '', newurl ); updatePropertiesByParseringHtml( newurl ); } } else { updatePropertiesResults( $( this ).serialize() ); } return false; } return true; } ); $( '.ajax-search-form form.opalestate-search-form' ).each( function () { var $form = $( this ); $( '.ajax-change select', this ).change( function () { if ( history.pushState ) { var ps = $form.serialize(); var newurl = window.location.protocol + '//' + window.location.host + window.location.pathname + '?' + ps; window.history.pushState( { path: newurl }, '', newurl ); } $form.submit(); return false; } ); } ); // // Sortable Change // // $( 'body' ).delegate( '#opalestate-sortable-form select', 'change', function () { var ps = ''; if ( $( 'form.opalestate-search-form' ).length > 0 ) { var $form = $( 'form.opalestate-search-form' ); if ( $( 'body' ).hasClass( 'archive' ) ) { ps = 'opalsortable=' + $( this ).val() + '&display=' + $( '.display-mode a.active' ).data( 'mode' ); } else { ps = $form.serialize() + '&opalsortable=' + $( this ).val() + '&display=' + $( '.display-mode a.active' ).data( 'mode' ); } } if ( $( '.opalesate-properties-results' ).length > 0 && ps ) { if ( history.pushState ) { var newurl = window.location.protocol + '//' + window.location.host + window.location.pathname + '?' + ps; window.history.pushState( { path: newurl }, '', newurl ); updatePropertiesByParseringHtml( newurl ); } } else { if ( history.pushState && $( 'body' ).hasClass( 'archive' ) ) { var newurl = window.location.protocol + '//' + window.location.host + window.location.pathname + '?' + ps; window.history.pushState( { path: newurl }, '', newurl ); } $( '#opalestate-sortable-form' ).submit(); } } ); // display mode $( 'body' ).delegate( '.display-mode a', 'click', function () { if ( $( '.opalesate-properties-results' ).length > 0 ) { var newurl = $( this ).attr( 'href' ); window.history.pushState( { path: newurl }, '', newurl ); updatePropertiesByParseringHtml( newurl ); return false; } } ); if ( $( '#opalestate-map-preview' ).length > 0 ) { $( 'body' ).delegate( 'form.opalestate-search-form select', 'change', function () { var params = $( 'form.opalestate-search-form' ).serialize(); var url = 'action=opalestate_ajx_get_properties&' + params; updatePreviewGoogleMap( url ); $( 'form.opalestate-search-form' ).submit(); return true; } ); $( 'body' ).delegate( 'form.opalestate-search-form input', 'change', function () { if ( $( this ).hasClass( 'ranger-geo_radius' ) ) { return false; } var params = $( 'form.opalestate-search-form' ).serialize(); var url = 'action=opalestate_ajx_get_properties&' + params; updatePreviewGoogleMap( url ); $( 'form.opalestate-search-form' ).submit(); } ); } } ); } )( jQuery ); ( function ( $ ) { 'use strict'; $( document ).ready( function () { $( '.opalestate-search-opal-map' ).each( function () { initializeMapAdressSearch( $( this ) ); } ); } ); function initializeMapAdressSearch( mapInstance ) { var searchInput = mapInstance.find( '.opal-map-search' ); // Search var autocomplete = new google.maps.places.Autocomplete( searchInput[ 0 ] ); // autocomplete.bindTo( 'bounds', map ); var latitude = mapInstance.find( '.opal-map-latitude' ); var longitude = mapInstance.find( '.opal-map-longitude' ); if ( ( typeof opalestateGmap !== 'undefined' ) && opalestateGmap.autocomplete_restrictions ) { autocomplete.setComponentRestrictions( { 'country': JSON.parse(opalestateGmap.autocomplete_restrictions) } ); } google.maps.event.addListener( autocomplete, 'place_changed', function () { var place = autocomplete.getPlace(); if ( !place.geometry ) { return; } if ( place.geometry.location.lat() ) { $( mapInstance ).addClass( 'active' ); } else { $( mapInstance ).removeClass( 'active' ); } latitude.val( place.geometry.location.lat() ); longitude.val( place.geometry.location.lng() ); } ); $( '.map-remove', mapInstance ).click( function () { latitude.val( '' ); longitude.val( '' ); searchInput.val( '' ); latitude.change(); } ); $( searchInput ).keypress( function ( event ) { if ( 13 === event.keyCode ) { event.preventDefault(); } } ); } } )( jQuery ); // source --> https://www.paxos-thalassatravel.com/wp-content/plugins/opal-estate-pro/assets/js/frontend/property.js?ver=1.6.9 /* global tinymce, wpCookies, autosaveL10n, switchEditors */ // Back-compat window.opalestate_messages = function() { return true; }; /** * @summary Adds autosave to the window object on dom ready. * * @since 3.9.0 * * @param {jQuery} $ jQuery object. * @param {window} The window object. * */ ( function( $, window ) { /** * @summary Auto saves the post. * * @since 3.9.0 * * @returns {Object} * {{ * getPostData: getPostData, * getCompareString: getCompareString, * disableButtons: disableButtons, * enableButtons: enableButtons, * local: ({hasStorage, getSavedPostData, save, suspend, resume}|*), * server: ({tempBlockSave, triggerSave, postChanged, suspend, resume}|*)} * } * The object with all functions for autosave. */ function opalestate_messages() { var $document = $( document ); var $page = $( '#page-importer' ); /** * */ function trigger_send_messages(){ $( ".opalestate-message-form" ).on('submit', function(){ make_ajax( $( this ).serialize(), this ); return false; } ); } function toggle_submit_button ( submit ){ var _this = $('button[type="submit"]', submit ); if( $( _this ).attr('disabled') == "disabled" ){ $( _this ).removeAttr( 'disabled' ); $(_this).find('i').remove( ); } else { $( _this ).attr('disabled','disabled'); $(_this).append( '' ); } }; function trigger_send_reply(){ $( ".opalestate-form-reply" ).on( "submit" , function(){ var message = $( 'textarea', this).val(); if( message ) { make_ajax_reply( $( this ).serialize(), this ); } return false; } ); } function make_ajax_reply( data, _this ){ $( '.opalestate-message-notify', _this ).remove(); $.ajax({ type : 'POST', dataType : 'json', url : opalesateJS.ajaxurl, data : 'action=send_email_contact_reply&' + data, success: function( response ) { if( response ) { var _class = response.status ? 'success' : 'danger'; // $( _this ).append('

'+ response.msg +'

'); if( response.status ){ $( 'textarea', _this ).val( "" ); var myToast = $.toast({ heading: response.heading, text: response.msg, icon: 'success', position: 'bottom-right', hideAfter: 3500, showHideTransition: 'fade' }); if ( response.data ){ var html = '
'; html += '
'; html += ''; html += '
'; html += '
'+response.data.created+'
' + response.data.message; html += '
'; html += '
'; $(".opalestate-read-message").append( html ); } } else { } } } }); } function load_message_reply(){ } function make_ajax ( data, _this ) { $( '.opalestate-message-notify', _this ).remove(); var action = $( _this ).data('action')? $( _this ).data('action') : 'send_email_contact'; toggle_submit_button( _this ); $.ajax({ type : 'POST', dataType : 'json', url : opalesateJS.ajaxurl, data : 'action='+action+'&' + data, success: function( response ) { if( response ) { var _class = response.status ? 'success' : 'danger'; $( _this ).append('

'+ response.msg +'

'); if( response.status ){ $( 'textarea', _this ).val( "" ); } toggle_submit_button( _this ); } }, error: function( response ) { console.log(response) } }); } function trigger_print_property() { $( '.js-print-property' ).on( 'click', function ( e ) { e.preventDefault(); var id = $( this ).data( 'id' ); var newWindown = window.open( '', 'Print!', 'width=800 ,height=850' ); $.ajax( { type: 'POST', url: opalesateJS.ajaxurl, data: { 'action': 'opalestate_ajax_create_property_print', 'id': id, }, success: function ( data ) { newWindown.document.write( data ); newWindown.document.close(); newWindown.focus(); setTimeout( function () { newWindown.print(); }, 1000 ); } } ); } ); } function trigger_toggle_featured() { /// ajax set featured $( 'body' ).delegate( '.btn-toggle-featured', 'click', function () { var $this = $( this ); $.ajax( { type: 'POST', url: opalesateJS.ajaxurl, data: 'property_id=' + $( this ).data( 'property-id' ) + '&action=opalestate_toggle_featured_property', // elements. dataType: 'json', success: function ( data ) { if ( data.status ) { $( '[data-id="property-toggle-featured-' + $this.data( 'property-id' ) + '"]' ) .removeClass( 'hide' ); $this.remove(); } else { alert( data.msg ); } } } ); return false; } ); } function trigger_view_gallery(){ $( 'body' ).delegate( '.opalestate-ajax-gallery', 'click', function () { var parent = $(this).parent(); var open_gallery = function ( parent ){ $(parent ).magnificPopup({ type: 'image', delegate: 'a.gallery-item', gallery:{ enabled:true } }); $( 'a.gallery-item', parent ).trigger('click'); } if( $(".gallery-item", parent ).length <= 0 ){ var items = []; $.ajax( { type: 'POST', url: opalesateJS.ajaxurl, data: 'property_id=' + $( this ).data( 'id' ) + '&action=opalestate_gallery_property', // elements. dataType: 'json', success: function ( data ) { if( data.gallery ){ for( var image in data.gallery ){ parent.append( '' ); } } open_gallery( parent ); } } ); } else { open_gallery( parent ); } return false; } ); } /** * @summary Sets the autosave time out. * * Wait for TinyMCE to initialize plus 1 second. for any external css to finish loading, * then save to the textarea before setting initialCompareString. * This avoids any insignificant differences between the initial textarea content and the content * extracted from the editor. * * @since 3.9.0 * * @returns {void} */ $document.on( '.opalestate-message-form', function( event, editor ) { }).ready( function() { trigger_send_messages(); trigger_send_reply(); trigger_print_property(); trigger_toggle_featured(); trigger_view_gallery(); }); return { }; } /** @namespace wp */ window.wp = window.wp || {}; window.wp.opalestate_messages = opalestate_messages(); }( jQuery, window )); // source --> https://www.paxos-thalassatravel.com/wp-content/plugins/opal-estate-pro/assets/3rd/select2/js/select2.min.js?ver=1.3 /*! Select2 4.0.7 | https://github.com/select2/select2/blob/master/LICENSE.md */ !function(n){"function"==typeof define&&define.amd?define(["jquery"],n):"object"==typeof module&&module.exports?module.exports=function(e,t){return void 0===t&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),n(t),t}:n(jQuery)}(function(u){var e=function(){if(u&&u.fn&&u.fn.select2&&u.fn.select2.amd)var e=u.fn.select2.amd;var t,n,r,h,o,s,f,g,m,v,y,_,i,a,w;function b(e,t){return i.call(e,t)}function l(e,t){var n,r,i,o,s,a,l,c,u,d,p,h=t&&t.split("/"),f=y.map,g=f&&f["*"]||{};if(e){for(s=(e=e.split("/")).length-1,y.nodeIdCompat&&w.test(e[s])&&(e[s]=e[s].replace(w,"")),"."===e[0].charAt(0)&&h&&(e=h.slice(0,h.length-1).concat(e)),u=0;u":">",'"':""","'":"'","/":"/"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},i.appendMany=function(e,t){if("1.7"===o.fn.jquery.substr(0,3)){var n=o();o.map(t,function(e){n=n.add(e)}),t=n}e.append(t)},i.__cache={};var n=0;return i.GetUniqueElementId=function(e){var t=e.getAttribute("data-select2-id");return null==t&&(e.id?(t=e.id,e.setAttribute("data-select2-id",t)):(e.setAttribute("data-select2-id",++n),t=n.toString())),t},i.StoreData=function(e,t,n){var r=i.GetUniqueElementId(e);i.__cache[r]||(i.__cache[r]={}),i.__cache[r][t]=n},i.GetData=function(e,t){var n=i.GetUniqueElementId(e);return t?i.__cache[n]&&null!=i.__cache[n][t]?i.__cache[n][t]:o(e).data(t):i.__cache[n]},i.RemoveData=function(e){var t=i.GetUniqueElementId(e);null!=i.__cache[t]&&delete i.__cache[t]},i}),e.define("select2/results",["jquery","./utils"],function(p,h){function r(e,t,n){this.$element=e,this.data=n,this.options=t,r.__super__.constructor.call(this)}return h.Extend(r,h.Observable),r.prototype.render=function(){var e=p('');return this.options.get("multiple")&&e.attr("aria-multiselectable","true"),this.$results=e},r.prototype.clear=function(){this.$results.empty()},r.prototype.displayMessage=function(e){var t=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var n=p('
  • '),r=this.options.get("translations").get(e.message);n.append(t(r(e.args))),n[0].className+=" select2-results__message",this.$results.append(n)},r.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},r.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n",{class:"select2-results__options select2-results__options--nested"});d.append(a),o.append(s),o.append(d)}else this.template(e,t);return h.StoreData(t,"data",e),t},r.prototype.bind=function(t,e){var l=this,n=t.id+"-results";this.$results.attr("id",n),t.on("results:all",function(e){l.clear(),l.append(e.data),t.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),t.on("results:append",function(e){l.append(e.data),t.isOpen()&&l.setClasses()}),t.on("query",function(e){l.hideMessages(),l.showLoading(e)}),t.on("select",function(){t.isOpen()&&(l.setClasses(),l.options.get("scrollAfterSelect")&&l.highlightFirstItem())}),t.on("unselect",function(){t.isOpen()&&(l.setClasses(),l.options.get("scrollAfterSelect")&&l.highlightFirstItem())}),t.on("open",function(){l.$results.attr("aria-expanded","true"),l.$results.attr("aria-hidden","false"),l.setClasses(),l.ensureHighlightVisible()}),t.on("close",function(){l.$results.attr("aria-expanded","false"),l.$results.attr("aria-hidden","true"),l.$results.removeAttr("aria-activedescendant")}),t.on("results:toggle",function(){var e=l.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),t.on("results:select",function(){var e=l.getHighlightedResults();if(0!==e.length){var t=h.GetData(e[0],"data");"true"==e.attr("aria-selected")?l.trigger("close",{}):l.trigger("select",{data:t})}}),t.on("results:previous",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e);if(!(n<=0)){var r=n-1;0===e.length&&(r=0);var i=t.eq(r);i.trigger("mouseenter");var o=l.$results.offset().top,s=i.offset().top,a=l.$results.scrollTop()+(s-o);0===r?l.$results.scrollTop(0):s-o<0&&l.$results.scrollTop(a)}}),t.on("results:next",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e)+1;if(!(n>=t.length)){var r=t.eq(n);r.trigger("mouseenter");var i=l.$results.offset().top+l.$results.outerHeight(!1),o=r.offset().top+r.outerHeight(!1),s=l.$results.scrollTop()+o-i;0===n?l.$results.scrollTop(0):ithis.$results.outerHeight()||o<0)&&this.$results.scrollTop(i)}},r.prototype.template=function(e,t){var n=this.options.get("templateResult"),r=this.options.get("escapeMarkup"),i=n(e,t);null==i?t.style.display="none":"string"==typeof i?t.innerHTML=r(i):p(t).append(i)},r}),e.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),e.define("select2/selection/base",["jquery","../utils","../keys"],function(n,r,i){function o(e,t){this.$element=e,this.options=t,o.__super__.constructor.call(this)}return r.Extend(o,r.Observable),o.prototype.render=function(){var e=n('');return this._tabindex=0,null!=r.GetData(this.$element[0],"old-tabindex")?this._tabindex=r.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),e.attr("title",this.$element.attr("title")),e.attr("tabindex",this._tabindex),this.$selection=e},o.prototype.bind=function(e,t){var n=this,r=(e.id,e.id+"-results");this.container=e,this.$selection.on("focus",function(e){n.trigger("focus",e)}),this.$selection.on("blur",function(e){n._handleBlur(e)}),this.$selection.on("keydown",function(e){n.trigger("keypress",e),e.which===i.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){n.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){n.update(e.data)}),e.on("open",function(){n.$selection.attr("aria-expanded","true"),n.$selection.attr("aria-owns",r),n._attachCloseHandler(e)}),e.on("close",function(){n.$selection.attr("aria-expanded","false"),n.$selection.removeAttr("aria-activedescendant"),n.$selection.removeAttr("aria-owns"),window.setTimeout(function(){n.$selection.focus()},0),n._detachCloseHandler(e)}),e.on("enable",function(){n.$selection.attr("tabindex",n._tabindex)}),e.on("disable",function(){n.$selection.attr("tabindex","-1")})},o.prototype._handleBlur=function(e){var t=this;window.setTimeout(function(){document.activeElement==t.$selection[0]||n.contains(t.$selection[0],document.activeElement)||t.trigger("blur",e)},1)},o.prototype._attachCloseHandler=function(e){n(document.body).on("mousedown.select2."+e.id,function(e){var t=n(e.target).closest(".select2");n(".select2.select2-container--open").each(function(){n(this);this!=t[0]&&r.GetData(this,"element").select2("close")})})},o.prototype._detachCloseHandler=function(e){n(document.body).off("mousedown.select2."+e.id)},o.prototype.position=function(e,t){t.find(".selection").append(e)},o.prototype.destroy=function(){this._detachCloseHandler(this.container)},o.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},o}),e.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,r){function i(){i.__super__.constructor.apply(this,arguments)}return n.Extend(i,t),i.prototype.render=function(){var e=i.__super__.render.call(this);return e.addClass("select2-selection--single"),e.html(''),e},i.prototype.bind=function(t,e){var n=this;i.__super__.bind.apply(this,arguments);var r=t.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",r).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",r),this.$selection.on("mousedown",function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("blur",function(e){}),t.on("focus",function(e){t.isOpen()||n.$selection.focus()})},i.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},i.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},i.prototype.selectionContainer=function(){return e("")},i.prototype.update=function(e){if(0!==e.length){var t=e[0],n=this.$selection.find(".select2-selection__rendered"),r=this.display(t,n);n.empty().append(r),n.attr("title",t.title||t.text)}else this.clear()},i}),e.define("select2/selection/multiple",["jquery","./base","../utils"],function(i,e,a){function n(e,t){n.__super__.constructor.apply(this,arguments)}return a.Extend(n,e),n.prototype.render=function(){var e=n.__super__.render.call(this);return e.addClass("select2-selection--multiple"),e.html('
      '),e},n.prototype.bind=function(e,t){var r=this;n.__super__.bind.apply(this,arguments),this.$selection.on("click",function(e){r.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".select2-selection__choice__remove",function(e){if(!r.options.get("disabled")){var t=i(this).parent(),n=a.GetData(t[0],"data");r.trigger("unselect",{originalEvent:e,data:n})}})},n.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},n.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},n.prototype.selectionContainer=function(){return i('
    • ×
    • ')},n.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],n=0;n×');a.StoreData(r[0],"data",t),this.$selection.find(".select2-selection__rendered").prepend(r)}},e}),e.define("select2/selection/search",["jquery","../utils","../keys"],function(r,s,a){function e(e,t,n){e.call(this,t,n)}return e.prototype.render=function(e){var t=r('');this.$searchContainer=t,this.$search=t.find("input");var n=e.call(this);return this._transferTabIndex(),n},e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("open",function(){r.$search.trigger("focus")}),t.on("close",function(){r.$search.val(""),r.$search.removeAttr("aria-activedescendant"),r.$search.trigger("focus")}),t.on("enable",function(){r.$search.prop("disabled",!1),r._transferTabIndex()}),t.on("disable",function(){r.$search.prop("disabled",!0)}),t.on("focus",function(e){r.$search.trigger("focus")}),t.on("results:focus",function(e){r.$search.attr("aria-activedescendant",e.id)}),this.$selection.on("focusin",".select2-search--inline",function(e){r.trigger("focus",e)}),this.$selection.on("focusout",".select2-search--inline",function(e){r._handleBlur(e)}),this.$selection.on("keydown",".select2-search--inline",function(e){if(e.stopPropagation(),r.trigger("keypress",e),r._keyUpPrevented=e.isDefaultPrevented(),e.which===a.BACKSPACE&&""===r.$search.val()){var t=r.$searchContainer.prev(".select2-selection__choice");if(0this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),e.define("select2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.query=function(n,r,i){var o=this;this.current(function(e){var t=null!=e?e.length:0;0=o.maximumSelectionLength?o.trigger("results:message",{message:"maximumSelected",args:{maximum:o.maximumSelectionLength}}):n.call(o,r,i)})},e}),e.define("select2/dropdown",["jquery","./utils"],function(t,e){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('');return e.attr("dir",this.options.get("dir")),this.$dropdown=e},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),e.define("select2/dropdown/search",["jquery","../utils"],function(i,e){function t(){}return t.prototype.render=function(e){var t=e.call(this),n=i('');return this.$searchContainer=n,this.$search=n.find("input"),t.prepend(n),t},t.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),this.$search.on("keydown",function(e){r.trigger("keypress",e),r._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(e){i(this).off("keyup")}),this.$search.on("keyup input",function(e){r.handleSearch(e)}),t.on("open",function(){r.$search.attr("tabindex",0),r.$search.focus(),window.setTimeout(function(){r.$search.focus()},0)}),t.on("close",function(){r.$search.attr("tabindex",-1),r.$search.val(""),r.$search.blur()}),t.on("focus",function(){t.isOpen()||r.$search.focus()}),t.on("results:all",function(e){null!=e.query.term&&""!==e.query.term||(r.showSearch(e)?r.$searchContainer.removeClass("select2-search--hide"):r.$searchContainer.addClass("select2-search--hide"))})},t.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},t.prototype.showSearch=function(e,t){return!0},t}),e.define("select2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,r){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,r)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),r=t.length-1;0<=r;r--){var i=t[r];this.placeholder.id===i.id&&n.splice(r,1)}return n},e}),e.define("select2/dropdown/infiniteScroll",["jquery"],function(i){function e(e,t,n,r){this.lastParams={},e.call(this,t,n,r),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&this.$results.append(this.$loadingMore)},e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("query",function(e){r.lastParams=e,r.loading=!0}),t.on("query:append",function(e){r.lastParams=e,r.loading=!0}),this.$results.on("scroll",function(){var e=i.contains(document.documentElement,r.$loadingMore[0]);if(!r.loading&&e){var t=r.$results.offset().top+r.$results.outerHeight(!1);r.$loadingMore.offset().top+r.$loadingMore.outerHeight(!1)<=t+50&&r.loadMore()}})},e.prototype.loadMore=function(){this.loading=!0;var e=i.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},e.prototype.createLoadingMore=function(){var e=i('
    • '),t=this.options.get("translations").get("loadingMore");return e.html(t(this.lastParams)),e},e}),e.define("select2/dropdown/attachBody",["jquery","../utils"],function(f,a){function e(e,t,n){this.$dropdownParent=n.get("dropdownParent")||f(document.body),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var r=this,i=!1;e.call(this,t,n),t.on("open",function(){r._showDropdown(),r._attachPositioningHandler(t),i||(i=!0,t.on("results:all",function(){r._positionDropdown(),r._resizeDropdown()}),t.on("results:append",function(){r._positionDropdown(),r._resizeDropdown()}))}),t.on("close",function(){r._hideDropdown(),r._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},e.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},e.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t.removeClass("select2"),t.addClass("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},e.prototype.render=function(e){var t=f(""),n=e.call(this);return t.append(n),this.$dropdownContainer=t},e.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},e.prototype._attachPositioningHandler=function(e,t){var n=this,r="scroll.select2."+t.id,i="resize.select2."+t.id,o="orientationchange.select2."+t.id,s=this.$container.parents().filter(a.hasScroll);s.each(function(){a.StoreData(this,"select2-scroll-position",{x:f(this).scrollLeft(),y:f(this).scrollTop()})}),s.on(r,function(e){var t=a.GetData(this,"select2-scroll-position");f(this).scrollTop(t.y)}),f(window).on(r+" "+i+" "+o,function(e){n._positionDropdown(),n._resizeDropdown()})},e.prototype._detachPositioningHandler=function(e,t){var n="scroll.select2."+t.id,r="resize.select2."+t.id,i="orientationchange.select2."+t.id;this.$container.parents().filter(a.hasScroll).off(n),f(window).off(n+" "+r+" "+i)},e.prototype._positionDropdown=function(){var e=f(window),t=this.$dropdown.hasClass("select2-dropdown--above"),n=this.$dropdown.hasClass("select2-dropdown--below"),r=null,i=this.$container.offset();i.bottom=i.top+this.$container.outerHeight(!1);var o={height:this.$container.outerHeight(!1)};o.top=i.top,o.bottom=i.top+o.height;var s=this.$dropdown.outerHeight(!1),a=e.scrollTop(),l=e.scrollTop()+e.height(),c=ai.bottom+s,d={left:i.left,top:o.bottom},p=this.$dropdownParent;"static"===p.css("position")&&(p=p.offsetParent());var h=p.offset();d.top-=h.top,d.left-=h.left,t||n||(r="below"),u||!c||t?!c&&u&&t&&(r="below"):r="above",("above"==r||t&&"below"!==r)&&(d.top=o.top-h.top-s),null!=r&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+r),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+r)),this.$dropdownContainer.css(d)},e.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},e.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},e}),e.define("select2/dropdown/minimumResultsForSearch",[],function(){function e(e,t,n,r){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,r)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,r=0;r');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container.addClass("select2-container--"+this.options.get("theme")),u.StoreData(e[0],"element",this.$element),e},d}),e.define("jquery-mousewheel",["jquery"],function(e){return e}),e.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],function(i,e,o,t,s){if(null==i.fn.select2){var a=["open","close","destroy"];i.fn.select2=function(t){if("object"==typeof(t=t||{}))return this.each(function(){var e=i.extend(!0,{},t);new o(i(this),e)}),this;if("string"!=typeof t)throw new Error("Invalid arguments for Select2: "+t);var n,r=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=s.GetData(this,"select2");null==e&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2."),n=e[t].apply(e,r)}),-1 https://www.paxos-thalassatravel.com/wp-content/plugins/photo-gallery/js/jquery.sumoselect.min.js?ver=3.0.3 /* * jquery.sumoselect - v3.0.3 * http://hemantnegi.github.io/jquery.sumoselect * 2016-12-12 * * Copyright 2015 Hemant Negi * Email : hemant.frnz@gmail.com * Compressor http://refresh-sf.com/ */ (function(factory) { 'use strict'; if (typeof define === 'function' && define.amd) { define(['jquery'], factory); } else if (typeof exports !== 'undefined') { module.exports = factory(require('jquery')); } else { factory(jQuery); } })(function ($) { 'namespace sumo'; $.fn.SumoSelect = function (options) { /* This is the easiest way to have default options.*/ var settings = $.extend({ placeholder: 'Select Here', /* Dont change it here.*/ csvDispCount: 3, /* display no. of items in multiselect. 0 to display all.*/ captionFormat:'{0} Selected', /* format of caption text. you can set your locale.*/ captionFormatAllSelected:'{0} all selected!', /* format of caption text when all elements are selected. set null to use captionFormat. It will not work if there are disabled elements in select.*/ floatWidth: 400, /* Screen width of device at which the list is rendered in floating popup fashion.*/ forceCustomRendering: false, /* force the custom modal on all devices below floatWidth resolution.*/ nativeOnDevice: ['Android', 'BlackBerry', 'iPhone', 'iPad', 'iPod', 'Opera Mini', 'IEMobile', 'Silk'], outputAsCSV: false, /* true to POST data as csv ( false for Html control array ie. default select )*/ csvSepChar: ',', /* separation char in csv mode*/ okCancelInMulti: false, /* display ok cancel buttons in desktop mode multiselect also.*/ isClickAwayOk: false, /* for okCancelInMulti=true. sets whether click outside will trigger Ok or Cancel (default is cancel).*/ triggerChangeCombined: true, /* im multi select mode whether to trigger change event on individual selection or combined selection.*/ selectAll: false, /* to display select all button in multiselect mode.|| also select all will not be available on mobile devices.*/ search: false, /* to display input for filtering content. selectAlltext will be input text placeholder*/ searchText: 'Search...', /* placeholder for search input*/ noMatch: 'No matches for "{0}"', prefix: '', /* some prefix usually the field name. eg. 'Hello'*/ locale: ['OK', 'Cancel', 'Select All'], /* all text that is used. don't change the index.*/ up: false, /* set true to open upside.*/ showTitle: true /* set to false to prevent title (tooltip) from appearing*/ }, options); var ret = this.each(function () { var selObj = this; /* the original select object.*/ if (this.sumo || !$(this).is('select')) return; /* already initialized*/ this.sumo = { E: $(selObj), /* the jquery object of original select element.*/ is_multi: $(selObj).attr('multiple'), /* if its a multiple select*/ select: '', caption: '', placeholder: '', optDiv: '', CaptionCont: '', ul:'', is_floating: false, is_opened: false, /* backdrop: '', */ mob:false, /* if to open device default select */ Pstate: [], createElems: function () { var O = this; O.E.wrap('